// 类的实现

#include "Point.h"
#include <iostream>
using namespace std;

int Point::count = 0;// 使用类名初始化静态数据成员

Point::Point(const Point &p): x(p.x), y(p.y) {
    count++;
}

void Point::showCount() {
    cout << " Object count = " << count << endl;
}



Point1::Point1(): x(0), y(0) {
    cout << "Default Constructor called." << endl;
}
Point1::Point1(int x, int y): x(x), y(y) {
    cout << "Constructor called." << endl;
}
Point1::~Point1() {
    cout << "Destructor called." << endl;
}
void Point1::move(int newX, int newY) {
    cout << "Moving the point to (" << newX << ", " << newY << ")" << endl;
    x = newX;
    y = newY;
}